Systems and methods for registration of hemispheric images for panomaric viewing

ABSTRACT

Systems and methods for registering hemispheric images obtained using a fisheye lens for panoramic viewing, relating to spatial alignment and colour balancing of complement half-side images derived from the hemispheric images. The systems and methods for spatial alignment determine the displacement of the digitized recorded images using a single translation and rotation model of distortion, which further evaluates the centre of projection, and the extent of translation and rotation. The system and method for colour balancing iteratively increase (or decrease) the values of pixels near the edge (discontinuity) between the two half-sides of an image, each time taking into consideration the average difference of pixel colour across a smaller strip of the edge near the pixel. This invention removes the colour differential but does not remove any detail underlying the features of the image.

FIELD OF THE INVENTION

[0001] This invention relates to systems and methods for registeringhemispheric images for panoramic viewing. In particular it relates tospatial alignment and colour balancing of images.

BACKGROUND AND GENERAL DESCRIPTION

[0002] Fisheye lens has experienced success in a number of applicationsinvolving panoramic or wide field-of-view applications. Such wouldinclude cinematography (U.S. Pat. No. 4,070,098), motionlesssurveillance (U.S. Pat. No. RE036207), and image-based virtual reality(U.S. Pat. No. 5,960,108).

[0003] The advantage of fisheye projection is its large field of viewcompared to conventional rectilinear film. Images of field of view up to220 degrees and beyond may be obtained with a fisheye lens. It has beenspeculated that a field of view infinitesimally less than 360 degrees isalso obtainable, although the precise practical application of a lens ofthis type may be limited. In contrast, a conventional camera wouldrequire a rectilinear image recording surface of infinite dimensions foreven 180 degrees of field of view.

[0004] As long ago as 1964, formal studies have been made of the opticalcharacteristics of the fisheye lens (Kenro Miyamoto, “Fish eye lens”,Journal of Optical Society of America, 54:1060-1061, 1964). In 1983, NedGreene suggested the use of fisheye images to generate environmentalmaps (Ned Greene, “A Method for Modeling Sky for Computer Animation”,Proc. First Int'l Conf. Engineering and Computer Graphics, pp.297-300,1984). During the same year, Max Nelson described the use of

[0005] In 1986, the use of perspective mapping for a fisheye image,projecting the latter into the sides of a rectangular box as anenvironmental map was introduced by Greene (Ned Greene, “EnvironmentalMapping and Other Applications of World Projections”, IEEE ComputerGraphics and Applications, November 1986, vol. 6, no. 11, pp. 21-29).Greene took a 180 degree fisheye image (a fisheye environmental map) andprojected it onto the six sides of a cube for perspective viewing.

[0006] Producing high-quality panoramic imaging using Greene's approachposes a number of difficulties. Each hemispheric image produces fourhalf-sides of a cube, in addition to a full side, which requireregistration with its complement from the other hemispheric image.Registration of the half-images has two associated problems: spatialalignment and colour balancing.

[0007] Where the lens has a field of view greater than 180 degrees, thecorresponding half-sides (as de-warped from the raw source image)require spatial alignment due to possible rotational and translationaldistortion. Furthermore, the image recording device would notnecessarily capture the images precisely in the same area on therecording surface. Conventional methods of aligning the sides of suchimages are essentially manual in nature; even if assisted by graphicssoftware, the process requires human intervention to line up the edgesof half-sides based on the features in the images. This is oftenimprecise and difficult due to the multiple sources of distortion. Thereis a need for a more automatic process which reduces human intervention.

[0008] Chromatically, each half-side must be aligned relative to itscomplement. For example, the recording device may have the same exposuretimes and aperture openings for each of the two images despite the factthat the amount of light recorded for each image differs, as where thelighting changed between the two capture events, or alternatively, wherethe exposure times are different for each image despite equivalentlighting conditions. If aperture size is controlled automatically,further mismatches may result. As a result the complementary edges ofhalf-images have different colour intensity but generally the samedetail and level of noise.

[0009] Existing methodology for colour balancing tend to average thecolour values of pixels in the relevant neighbourhood of the transition.This has the desired effect of bringing the difference across thetransition into line. However, the disadvantage concerns the concomitantloss of detail. As a result there is a perceptible blurring across theregion of the transition. When the width of the overlapped region isnarrow as compared to lighting imbalance, the transition may appear tooabrupt.

SUMMARY OF THE INVENTION

[0010] This invention provides systems and methods for registeringhemispheric images obtained using a fisheye lens for panoramic viewing.In particular it relates to spatial alignment and colour balancing ofcomplement half-side images derived from the hemispheric images.

[0011] The system and method for spatial alignment determines thedisplacement of the digitized recorded images using a single translationand rotation model of distortion, which further evaluates the centre ofprojection, the distance in pixel for 180 degree in the recorded image,the extent of translation and rotation.

[0012] The system and method for colour balancing iteratively increase(or decrease) the values of pixels near the edge (discontinuity) betweenthe two half-sides of an image, each time taking into consideration theaverage difference of pixel colour across the edge of a strip ofdecreasing width. This invention removes the colour differential butdoes not remove any detail underlying the features of the image.

BRIEF DESCRIPTION OF THE DRAWINGS

[0013] Embodiments of the invention will be described by way of exampleand with reference to the drawings in which:

[0014]FIG. 1: A diagram showing the relationship between the anglesubtended by a point and the radial position on the recorded sourceimage.

[0015]FIG. 2: A diagram showing the mapping from the hemispheric imageto 5 sides of the cube.

[0016]FIG. 3: A diagram indicating how the Cartesian coordinates of apoint correspond to its spherical coordinates.

[0017]FIG. 4: A diagram of the two sides of an edge (discontinuity incolour regimen) as represented by two 2-dimensional arrays.

DETAILED DESCRIPTION OF THE INVENTION

[0018] The description given below assumes the use of an ideal fisheyelens, meaning that the lens possesses negligible if no radialdistortion: the radial position recorded in the source image for a pointimaged is proportional to the zenith angle the point subtends withrespect to the axis of projection (see FIG. 1). However, a personknowledgeable in the art would be able to extend the invention disclosedbelow to the case where there is radial distortion. Adjustment to takeinto consideration lens characteristics are clear once thecharacteristics are determined.

[0019] Furthermore, the fisheye lens has a field of view greater than180 degrees.

OVERVIEW

[0020] In the present invention, an environmental map of cube consistingof 6 canonical views is reconstructed from two hemispherical fisheyeimages, as Greene had suggested, each with field of view equal orgreater than 180 degrees. Each fisheye image is manipulated to generate1 complete side and 4 half-sides of a cube; and the half sides are thenintegrated to form 4 complete sides; all six sides as the environmentalmap are then placed together for viewing as a complete cube texture mapusing computer graphic techniques. See FIG. 2 for an overall depictionof how a hemispherical image may be decomposed into the various sides ofa cube.

[0021] The spherical coordinates, ρ, θ, φ, expressed in Cartesiancoordinates, x, y, z, of a point in space, are as follows (see FIG. 3):$\begin{matrix}{\rho = \sqrt{x^{2} + y^{2}}} \\{\theta = {\tan^{- 1}\left( \frac{y}{x} \right)}} \\{\varphi = {\tan^{- 1}\left( \frac{\rho}{z} \right)}}\end{matrix}$

[0022] θ is the azimuthal angle, and φ, the zenith angle. The effect ofthe fisheye lens is such that each point Is projected onto a hemisphereof diameter D, centred at the origin, with the projective axis being thez-axis. The point on the hemi-sphere when subsequently projected ontothe x-y plane, corresponds to the source image coordinate (u, v) ascaptured by the image recording device. As a result, the value of thepixel at location (u, v) of the source image is assigned as the value ofthe pixel on the environmental map that corresponds to the (x, y, z)coordinate on the cube.

[0023] Given the above, for any point on the hemi-cube, the coordinate(u, v) in the source image (the environmental map) can be evaluated fromθ and φ, corresponding to the planar coordinates of the point ofintersection of a ray extending from the origin to the hemi-cube withthe hemi-sphere, as follows. $\begin{matrix}{u = {\frac{\varphi \quad D}{\pi}{\cos (\theta)}}} \\{v = {\frac{\varphi \quad D}{\pi}{\sin (\theta)}}}\end{matrix}$

[0024] Since the lens is ideal, the radial distance from the origin ofany point (u, v) on the x-y plane should be linear in the zenith angleφ. (Take the square root of the squares of u and v, which results in alinear function of φ.)

[0025] Given a digitized hemispheric fisheye source image formed asdescribed above, the starting point is to determine the centre ofprojection (u_(c), v_(c)) on the source image array, and the length inimage pixel, D, equal to a view of 180 degrees in zenith angle. Inpractice, the centre of projection, (i.e. the point where φ=0°) is notalways the centre of the source image array. One would then determinethe image array corresponding to each of the sides by determining foreach point in the corresponding image array the (x, y, z) coordinate,compute the corresponding (u, v) coordinate on the source image, andestimate the value of the pixel at (u, v) using some sort ofinterpolation scheme based on the neighboring pixel values. In theexpression for (u, v), the coordinate must be translated by the centreof projection (u_(c), v_(c)) in the source image.

[0026] At this point the images require colour balancing in order toremove visible discrepancies in colour between any two complementaryhalf-images along the separating edge.

[0027] With the geometry aligned and colour balanced, the visibleinterface between the hemi-cubes disappears, resulting in a completecube texture map comprising the six full-sides. The stacked facearrangement and ordering is preferably chosen to comply with a VRML cubeprimitive, for possible display on the world wide web.

[0028] Standard computer graphic techniques may be used to render thesix-sided cube centred at the origin. The viewpoint is fixed at theorigin, and the view direction along the positive z axis. Using apointing device such as a mouse, a viewer can vary the yaw and pitch ofthe view by rotating the cube around the Y- followed by a rotation aboutthe X-axis. The faces are mapped to the cube using perspective texturemapping, and as the user switches scenes, the texture map changes.

[0029] Preferred embodiments of this invention use one or moreelectronic processors with graphics display devices and other humaninterface devices. The processors may be a native device or resident onan electronic network such as a local area network, an intranet, anextranet, or the Internet. The source images may be derived from adigital camera, such as those using CCD cells, or from digitized imagesof photographs taken with a conventional camera outfitted with a fisheyelens, amongst others.

[0030] Geometric Alignment

[0031] Spatial, or geometric, alignment of the two hemispheric imagesproceeds on the basis that there is an overlapping annular regionbetween the two images. Given a lens with a half field of view of v=105degrees, the annulus of overlap would be 30 degrees (two times 15degrees on each side) if the hemispheric images were taken exactly 180degrees apart. In this case, each annular region beyond the ringdenoting 180 degrees would be a mirror image of the annular region ofthe same dimension in the other hemispheric image (reflected across the1800 ring). Thus in FIG. 1 the region consisting of the two outermostconcentric annuli in each of the mapping of the two fisheye lens is amirror image of the another.

[0032] In practice, the camera may experience displacement from theideal position for taking the reverse image after recording the initialone: rotation about each of the 3 Cartesian axes and translationalmovement in the x-y plane may occur. The model of distortion assumed bythis invention however postulates 2 types of distortion: a translationin the x-y plane and a rotation about the projection z-axis. The imagerecorders are assumed to be directed precisely 180 degrees apart withcoincidental projection axes, the z-axis. The source image planes areassumed to be coplanar, but the image as recorded experiences a possibletranslational and rotational displacement.

[0033] The approach disclosed by this invention is to align 3 points inthe overlapping region of one hemispherical image with the same 3 pointsin the other image using the above mentioned model of distortion. Thismethod aligns the three pairs of points such that the zenith angle φfrom the centre of projection is the same for any two pairs of points.Once aligned, the centre of projection and the distance in pixel for 180degrees field of view may be computed. Knowledge of these two allows thecubic faces of the environmental map to be generated.

[0034] The following defines the notation adopted:

[0035] 3 non-collinear points p₁(x₁, y₁), p₃(x₃, y₃), and p₅(x₅, y₅) inthe overlapping annular region of a hemispheric source image T₁ with thecentre of projection at q₁ and the complement set of points p₂(x₂, y₂),p₄(x₄, y₄), and p₆(x₆, y₆) with its centre of projection at q₂ for thereverse image T₂ (Since T2 is the reverse image, it becomes necessary toreflect T₂ about the vertical axis defined by the azimuthal angle φbeing 90 or 180 degrees, to yield T₂′. For the purpose of simplicitythough, refer henceforth to T₂′ as T₂;

[0036] the angle that each source image is rotated about its axis ofprojection relative to the earth's horizon: a₁ and a₂, for T₁ and T₂respectively. For the purpose of simplicity, assume that a₂ is zero,that is to say, the second image is not rotated relative to the horizon;

[0037] the true center of projection: Q;

[0038] the diameter in pixels equivalent to 180 degrees field of view:D.

[0039] Given that the images T₁ and T₂ are precisely 180 degrees apart,any point p₁ will form the same azimuthal angle θ relative to q₁, thecentre of projection in its own image, as its complement p₂ would withq₂. Therefore, if the two centres of projection were the same point Q,then the z component of the vector cross product of (p₁-Q) and (p₂-Q)would equal zero since these two vectors are parallel.

[0040] The centre Q may be found assuming that displacement consistssolely of a translation Δx and Δy, and a rotation of angle α. Oneembodiment of this approach assumes that q₂ is fixed as the centre Q,and determines the displacement (Δx, Δy, α) of q₁, resulting in q₁′,such that the z components of the 3 vector cross products of (q₁′-p₁)and (q₂-p₂), (q₁′-p₃) and (q₂-p₄), and (q₁′-p₅) and (q₂-p₆) are allzero. (The cross products are all zero vectors since the initial vectorshave zero z component resulting in no planar components to the resultantcross products.)

[0041] This essentially sets up a system of 3 equations (the zcomponents of the cross products) in 3 unknowns (Δx, Δy, αx), which aperson skilled in the art is able to solve. For example, theNewton-Raphson iterative method for finding roots of systems may beused. An initial approximation to the solution for (Δx, Δy, α) may bethe translational difference between p₁ and p₂, and the angle zero.

[0042] The result of this computation is the 3-tuple, (Δx, Δy, α). Ifp_(i)′ is the result of translating and rotating p_(i), eachcomplementary pair of vectors (q₂-p_(i)′) and (q₂-p_(j)), where i=1, 3,and 5, and j=2, 4, and 6 respectively, are parallel, thus the linesjoining each complement pair of p_(i′) and p_(j) must intersect at thesame point q₂ (same position as Q and q₁′). As a result, the centres ofprojection in each hemispheric image (referred to as (u_(c), v_(c)) foreach hemispheric image earlier), q₁ and q₂, may be established.

[0043] Furthermore, it is now possible to determine D, the number ofpixels equal to 180 degrees field of view, which is used for evaluatingthe value of coordinates (u, v) in the environmental map. Since the sumof the zenith angle φ of a point in one image added to the zenith angleof the same point in the other hemispheric image is 180 degrees, thezenith angle 180 corresponds to the average of the radial distance forany two complement points. Therefore this allows D to be computed.

[0044] Given the centre of projection, (u_(c), v_(c)), for eachhemispheric image, and the distance in pixel D for 180 degrees, the 6perspective sides of the cubic environmental map may now be generated.

[0045] In one preferred embodiment of this invention, the user selectsfor display annular regions from both hemispheric images. Each annuluscovers typically the overlapping region between the two source images,subtended by the zenith angles between 270−ν and 90+ν, where ν is thehalf-field of view. For example, if ν is 105 degrees (i.e. the fullfield of view is 210 degrees), the annulus region corresponds to thefield of view between 165 and 195 degrees. Once the two annuli ofinterest are displayed, typically at the same time, the user may thenselect a common point in each annulus. This invention also includes thevariation where the user merely has to denote the approximate area wherethe second of the pair of points is located in the second image. Theelectronic processor would utilize imaging processing techniques such asa convolution mask to locate the precise point in the second imagecorresponding to the first point in the first image.

[0046] This invention further includes variations where automaticdetermination of the 3 common points are performed without humanintervention.

[0047] Although it is theoretically possible to select all three pointsin the same nearby neighbourhood, the preferred approach is to selectpoints which are widely spread apart, typically in different thirds ofthe annular region. Therefore, display of only a common sector of theannul typically occurs for the point selection process. Displayingsmaller areas permits greater spatial resolution and more preciselocation within the areas.

[0048] Once the common points are identified, the electronic processorcarries out computation of the centre of projection (u_(c), v_(c)) foreach hemispheric image and the distance D in pixel for 180 degrees fieldof view. The environmental map of the cubic sides are then ready to befully generated given these parameters and the rotation α.

[0049] Colour Balancing

[0050] In addition to removing spatial distortions as mentioned above,two complementary half-images as combined typically require colourbalancing due to different prevailing lighting conditions or imagingrecorder characteristics. This invention further discloses methods andapparatus for colour balancing across a discontinuity (or edge) in animage that does not remove detail from the image as a whole.

[0051] To illustrate the method by example, let one side of the edge berepresented by a 2 dimensional array A_(j,i), and the other sideB_(j,i), both of dimensions m+1 rows (indexed 0 to m) and n+1 columns(indexed 0 to n). The 0-th row of both arrays lie adjacent to the edgeas shown in FIG. 4, with rows further away from the edge in increasingindex of row. Although only one value for each pixel is indicated here,this method will work for any color model including RGB, CMY, YIQ, HSV,and HLS. These colour models are well known in the field of computergraphics. For example, in the case of an RGB colour model, there wouldbe 3 arrays, ₁A_(j,i), ₂A_(j,i), and ₃A_(j,i), corresponding to each ofthe red, green, and blue colour values; the same would apply for the Barrays.

[0052] This invention makes use of the concept of “imbalance waves” ofvarying frequency which runs additively parallel and adjacent to theedge for a certain depth normal to the edge. An iterative approach isadopted whereby a different filter is applied at each step to the edgeregion. The analogy is that each filter is a low pass filter, tuned to adistinct “frequency” level, which eliminates imbalance waves offrequency at that level and greater. During each iteration, a filter ofa lesser frequency is used until a frequency of 1 is reached.

[0053] Generally, at each iteration, a filter of level w==2^(h) isapplied, where h decreases from m to 0. The value w is a measure of thewidth of a strip on the edge, the average difference, in colour valueacross the edge on the strip, is permitted to influence colour valuesduring the steps constituting the particular iteration. The value m ischosen such that 2^(m+1) is less than the width of a full side of thecube, which will become clear later in this discussion. Instead ofpowers of two, which has the advantage of being intuitive and can enablem to decrease to the value 0 quickly as the logarithm of w, otherschemes for decreasing w will also suffice.

[0054] During an iteration, the difference at column i across the edgebetween any two adjacent A_(0,j) and B_(0,j) is evaluated as Δ_(i).

Δ_(i) =A _(0,i) ˜B _(0,i) i=0, 1, . . . , n

[0055] In cases where there is high contrast in difference across anedge, a slightly different method for computing Δ_(i) is helpful toavoid “bleeding” of the high intensity value of the one side into thelower intensity opposite side in the balanced image. This approachassumes the images as slightly overlapping in the rows and slightlyoffset in columns (which is typically the case in reality), and usesboth images. If it is assumed that there are x overlapping rows, one wayof computing the value of Δ_(i) is to use a small region across theboundary in one image and centred on A_(0,u) (or B_(0,i), no differencewhichever is used) as a square mask (typically 3 elements by 3elements). The region is overlaid on a series of corresponding areas inthe other image, the other areas within a typically square domaincentred on the ′A_(0,i) in the other image, where ′A_(0,i) is thecorresponding pixel for A_(0,i) in the original image. Each side of thedomain has size typically twice the overlapping width (plus one). Thesums of the squares of the differences between the values of the maskand the underlying pixels are calculated as the mask is translatedacross the surface of the domain. One embodiment calculates Δ_(i) as theaverage of the arithmetic difference of the mask the underlying pixelsof the image centred at the place of the minimal sum of squares.

[0056] If the overlap is greater than two, then the mask may be chosenbe larger than 3×3, up to the point where it may be limited intranslational freedom of only one pixel in any of the 8 directions.

[0057] An average of the differences, Γ_(i), for any column i on theedge is taken for 2w+1 differences centred on i, with wraparound valuesfor any difference with index exceeding the bounds of the differencearray.$\Gamma_{i} = \frac{\sum\limits_{k = {i - w}}^{i + w}\Delta_{k}}{{2w} + 1}$

[0058] where k=k+(n−1), if k<0, and k=k−(n−1), if k>n, for the purposeof the summation. Clearly, this is just one way of calculating theaverage of the difference, and the invention is not restricted to thisone way, although this results in computational efficiency. Othervariations could weight the differences by a window appropriate to thetype of image, e.g. a Gaussian window centred on i. Alternatively, theremay be a threshold for discounting those differences which exceed thethreshold. For example, the presence of a colour burst may be oneinstance where a precipitous drop in value across an edge should bediscounted. Visually, such a measure would have little impact on theresultant reconstructed image.

[0059] At this point, the value of the side with the lower value isadjusted upwards by a variation term which is a function of the averagedifference across the edge. The adjustment used decreases with distancefrom the edge. A preferred embodiment then redefines all the elements ofthe arrays, A_(j,i) and B_(j,i), as follows: $\begin{matrix}{A_{j,i} = {A_{j,i} - {\frac{1}{2}\Gamma_{i}\frac{w - j}{w}}}} \\{B_{j,i} = {B_{j,i} + {\frac{1}{2}\Gamma_{i}\frac{w - j}{w}}}}\end{matrix}$

[0060] Although the above weights the average difference decreasinglywith distance on a linear basis from the edge (w−j), this invention isnot limited to this weighting scheme. One variation is where a fasterdrop-off, e.g. an inverse exponential, is required by the character ofthe image.

[0061] The way that Δ_(i) is calculated influences the effect of a highcontrast edge. Without seeking out the minimum sum of square ofdifference, a high contrast edge will change the value of both sides ofthe edge more significantly than if the difference where the minimum sumof square occurred was used.

[0062] Typically, the iteration ends when w reaches the value of one(filter of frequency 1). However, it is possible to impose a thresholdbeyond which no further iterations are carried out. One approach isbased on the average difference across the edge. Once the averagedifference drops below a threshold, the iterative steps end. In thiscase the threshold may be taken relative to a measure of the noise inthe neighbourhood of the edge.

[0063] Preferred embodiments of this invention also involve computerprogram products which are recorded on a machine-readable media. Suchcomputer program products when loaded into an apparatus that can readand execute the instructions borne by the program products in order tocarry out the functions of geometric alignment or colour balancingdenoted above.

[0064] The system, methods, and products above may operate modularly orin serial. For example, the same system may perform both alignment andcolour balancing, or two separate systems operate serially on thedigitized images. These may be used in standalone configurations or in anetworked environment cooperating with many other applications, systems,databases etc. for capturing and processing. Environmental maps may begenerated from colour balanced images.

[0065] It will be appreciated that the description above relates to thepreferred embodiments by way of example only. Many variations on thedevice, method, and computer program product for delivering theinvention will be understood to those knowledgeable in the field, andsuch variations are within the scope of the invention as described,whether or not expressly described.

The embodiments of the invention in which an exclusive property orprivilege is claimed are defined as follows:
 1. A computer-assistedmethod for aligning two digitized overlapping hemispheric images of anenvironment obtained with a fisheye lens comprising the steps of (a)receiving the location of three spatial points as recorded in theoverlapping region of each hemispheric images; (b) determining thetranslation and rotation of one hemispheric image relative to its idealposition from the locations of the three spatial points in the twoimages based on a displacement model; and (c) obtaining the centre ofprojection in each image.
 2. A system for aligning two digitized twodigitized overlapping hemispheric images of an environment obtained witha fisheye lens comprising: (a) a unit for receiving the location ofthree spatial points as recorded in the overlapping region of eachhemispheric images; (b) a unit for determining the translation androtation of one hemispheric image relative to its ideal position fromthe locations of the three spatial points in the two images based on adisplacement model; and (c) a unit for obtaining the centre ofprojection in each image.
 3. A computer program product, comprising: Amemory having computer-readable code embodied therein for aligning twodigitized two digitized overlapping hemispheric images of an environmentobtained with a fisheye lens comprising: code means for receiving thelocation of three spatial points as recorded in the overlapping regionof each hemispheric images; code means for determining the translationand rotation of one hemispheric image relative to its ideal positionfrom the locations of the three spatial points in the two images basedon a displacement model; and code means for obtaining the centre ofprojection in each image
 4. A method for balancing the color differenceof two pixelated images joined together at an edge, comprisingiteratively increasing (or decreasing) the values of pixels near theedge, each time taking into consideration the average difference ofpixel colour across a smaller strip of the edge near the pixel.
 5. Asystem for balancing the color difference of two pixelated images joinedtogether at an edge, comprising means for iteratively increasing (ordecreasing) the values of pixels near the edge, each time taking intoconsideration the average difference of pixel colour across a smallerstrip of the edge near the pixel.
 6. A computer program product,comprising: A memory having computer-readable code embodied therein forbalancing the color difference of two pixelated images joined togetherat an edge comprising: code means for iteratively increasing (ordecreasing) the values of pixels near the edge, each time taking intoconsideration the average difference of pixel colour across a smallerstrip of the edge near the pixel.